<?php
class Application_Form_Category extends Zend_Form{

	public function __construct($options = null)
	{
		parent::__construct($options);
		$this->setName('category');

		$this->addElement('text', 'title', array(
            'filters'    => array('StringTrim'),
            'required'   => true,
		    'validators' => array(
                array('StringLength', false, array(1, 30)),
            ),
            'label'      => 'Name:',
		));
		$hasChild = new Zend_Form_Element_Hidden('has_child');
		$parentID = new Zend_Form_Element_Hidden('parent_id');
		$this->addElements(array($hasChild, $parentID));
		$this->addElement('submit','category_submit', array(
            'required' => false,
            'ignore'   => true,
            'label'    => 'submit'
            ));
	}

}